Skip to content

btc(v36 F11): canonical donation-script output exclusion + value-invariance KAT - #355

Merged
frstrtr merged 2 commits into
masterfrom
btc/f11-donation-exclude
Jun 23, 2026
Merged

btc(v36 F11): canonical donation-script output exclusion + value-invariance KAT#355
frstrtr merged 2 commits into
masterfrom
btc/f11-donation-exclude

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 23, 2026

Copy link
Copy Markdown
Owner

BTC F-mirror F11 — last V36 parity milestone for BTC (F1/F2/F10 already in). Mirrors LTC F11 (#349) onto the BTC SHA256d sharechain.

What

  • share_check.hpp: canonical exclude-then-append donation handling in the payout sort — both donation scripts (P2SH combined + P2PK) are excluded from per-miner destinations, donation folded into the single donation-last output. Factored into a donation-exclude helper.
  • f11_donation_invariance_test.cpp: value-invariance KAT, same shape as LTC f11_donation_invariance_test (ltc(v36): re-apply F11 canonical donation fold + value-invariance KAT #349). 5 cases proving the exclusion is byte/value-identical: combined-fold, both-scripts-excluded, no-donation-keys identity, dropped-P2PK-weight leak accounting, and real donation-constant pinning. Core invariant: sum(payout_outputs) + donation_amount == subsidy (no value created/destroyed).

Fence

Verification

Consensus payout-output change — for operator tap. I do not self-merge.

frstrtr added 2 commits June 23, 2026 08:58
Mirror of LTC v36 commit 18dd945 onto the BTC variant. All three gentx
sites (generate_share_transaction / create_local_share_v35 /
create_local_share) now exclude BOTH donation scripts (COMBINED + P2PK)
from per-miner payout dests and fold the COMBINED_DONATION_SCRIPT-keyed
weight into the single donation-last output. Rides core/donation.hpp SSOT
(FLAG6 #139). No F1 entanglement (F11 touches only the payout-sort path).

Prep-branch staging; PR stays unopened until integrator dispatches the
F-mirror post crossing-soak (#97). +51/-6, matches LTC F11 line counts.
Mirror ltc-doge #349 (31a0c2e): factor the canonical exclude-then-append
donation handling at the three gentx sites into
build_payout_outputs_excluding_donation(), and guard the parity arithmetic
with a 5-case value-invariance KAT (BTC_F11_DonationInvariance) — the test
shape that backfills the coverage gap which let PR-0 S1 silently revert LTC F11.

KAT over core::donation SSOT constants: (a) value invariance, (b) COMBINED
weight folds into donation-last, (c) both donation scripts excluded from
per-miner dests, (d) P2PK-drop boundary (value-neutral iff P2PK weight==0),
(e) real-consensus-bytes pin (23B P2SH / 67B P2PK).

Wire share_test.cpp as btc_share_test (twin of ltc share_test, uniquely named
to avoid the CMP0002 collision; btc had no live share_test - B0-deferred).
Add btc_share_test to build.yml --target allowlist; drift-guard green (67).
5/5 KAT + 6/6 btc_share_test suite local-green.
@frstrtr
frstrtr merged commit f6491c9 into master Jun 23, 2026
20 checks passed
frstrtr added a commit that referenced this pull request Jun 23, 2026
btc(v36 F11): canonical donation-script output exclusion + value-invariance KAT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant